package com.google.code.swingonfire.component.calendar;

import javax.swing.AbstractAction;
import javax.swing.Icon;

public abstract class AbstractJCalendarAction extends AbstractAction implements JCalendarModelListener
{

    private static final long serialVersionUID = -3447233229695246032L;

    private final JCalendarModel model;

    public AbstractJCalendarAction(JCalendarModel model)
    {
        super();

        this.model = model;

        model.addCalendarModelListener(this);
    }

    public AbstractJCalendarAction(JCalendarModel model, String name)
    {
        super(name);

        this.model = model;
    }

    public AbstractJCalendarAction(JCalendarModel model, String name, Icon icon)
    {
        super(name, icon);

        this.model = model;
    }

    public JCalendarModel getModel()
    {
        return model;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void calendarModelTypeChanged()
    {
        // intentionally left blank
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void calendarModelSelectionChanged()
    {
        // intentionally left blank
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void calendarModelDisplayChanged()
    {
        // intentionally left blank
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void calendarModelPropertyChanged(String property)
    {
        // intentionally left blank
    }

    
}
